
import { get, post, uploadImage } from '../utils/request'
module.exports = {
  user_login: function (username, password) {
    return post('/login/', {username:username, password, password})
  },
  get_user_info:function(){
    return get('/users/info/')
  },
  // 更换头像
  update_avatar:function(imgList){
    return uploadImage('/users/avatar/', imgList)
  },
  get_pairings:function(){
    // 配对列表
    return get('/users/pairings/')
  },
  apply_pairing:function(lover){
    // 申请配对
    return post('/users/pairing/',{'lover':lover})
  },
  accept_pairing:function(lover){
    // 接受配对
    return post('/users/accept/pairing/',{'lover':lover})
  },
  remove_pairing:function(){
    // 解除配对
    return post('/users/remove/pairing/')
  }
}